package com.heima.crm.controller;

import com.heima.crm.common.result.Result;
import com.heima.crm.pojos.dtos.LogPageDto;
import com.heima.crm.service.SysOperLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/api/systemLogs")
public class SysOperLogController {

    @Autowired
    private SysOperLogService sysOperLogService;

    @GetMapping("/page")
    public Result logPage(LogPageDto logPageDto){
        log.info("系统日志分页查询：{}",logPageDto);
        return sysOperLogService.pageLog(logPageDto);
    }

//    @GetMapping("/{id}")
//    public Result log(@PathVariable Long id){
//        log.info("详细日志查询：{}",id);
//        return sysOperLogService.log(id);
//
//    }
}
